package com.blueocean_health.care.management.domain.dto;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 医院表出参实体类 2017年8月22日17:00:05
 * @author wuyanli
 *
 */
public class PullDownDto {
//	public PullDownDto(String value, String name) {
//		super();
//		this.value = value;
//		this.name = name;
//	}
	//医院Id
	private String value;
	//医院名称
	private String name;
	
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Override
	public String toString() {
		return "HospitalDto [value=" + value + ", name=" + name + "]";
	}
	
	public static Map<String,String> convertToMap(List<PullDownDto> list){
		Map<String, String> map=new HashMap<>();
		for (PullDownDto item : list) {
			if (!map.containsKey(item.getValue())) {
				map.put(item.getValue(), item.getName());
			}
		}
		/*list.stream().parallel().forEach((item)->{
			
		});*/
		list=null;
		return map;
	}
	
}
